package com.kang.gaklibrary.service.impl;

import com.kang.gaklibrary.mapper.GoodsRecordMapper;
import com.kang.gaklibrary.model.GoodsRecord;
import com.kang.gaklibrary.service.GoodsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsRecordImpl implements GoodsRecordService {
    @Autowired
    private GoodsRecordMapper goodsRecordMapper;

    @Override
    public int insertGoodsRecord(GoodsRecord goodsRecord) {
        return goodsRecordMapper.insertGoodsRecord(goodsRecord);
    }

    @Override
    public List<GoodsRecord> selectMyGoodsByUserId(String userId) {
        return goodsRecordMapper.selectMyGoodsByUserId(userId);
    }

    @Override
    public List<GoodsRecord> selectBookGoodsByUserId(String userId) {
        return goodsRecordMapper.selectBookGoodsByUserId(userId);
    }

    @Override
    public int deleteBookGoodsRecordById(Integer id) {
        return goodsRecordMapper.deleteBookGoodsRecordById(id);
    }

}
